const { DataTypes } = require('sequelize');
const sequelize = require('../configs/sequelize_config');

const bizOrder = sequelize.define("biz_order", {
    order_id: {
        type: DataTypes.BIGINT,
        primaryKey: true
    },
    order_code: {
        type: DataTypes.STRING(30),
        allowNull: false
    },
    order_type: {
        type: DataTypes.INTEGER,
        defaultValue: 0
    },
    user_id: {
        type: DataTypes.BIGINT,
        defaultValue: null
    },
}, {
    underscored: true,
    freezeTableName: true,
    tableName: 'biz_order'
});

module.exports = bizOrder;
